package com.gsj.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gsj.system.eneity.Role;
import com.gsj.system.pojo.RolevoSecond;


import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    List<Role> queryBYuserfRole(Integer userId);

    List<Role> queryalluserfRole();

    int deletebyUserid(Integer userId);

    int editRoleStatus(Integer id, Integer status);

    List<Role> queryRoleByRoleId(Integer id);

    int editRoleByRoleId(Role role, String username);


    int deletebyRoleId(Integer roleId);

    int addNewRole(RolevoSecond role, String username);


    int insertUserRole(Integer roleId,List<Integer> userRoleIds);

    List<Role> queryall();

    int insertbyUserid(Integer userId, List<Integer> role);

    int deleterolebyuser(Integer userId);
}

